package com.vizhuo.base.dao.page;

/**
 * 数据库方言
 * 
 * @author xiansheng.meng
 * 
 */
public abstract class Dialect
{

	public static enum Type
	{
		MYSQL, ORACLE
	}

	/**
	 * 将sql转换为总记录数SQL
	 * 
	 * @param sql
	 *            SQL语句
	 * @return 总记录数的sql
	 */
	public String getCountString(String sql)
	{
		return "select count(1) from (" + sql + ") tmp_count";
	}

	public abstract String getLimitString(String sql, int offset, int limit);

}
